/**
 * Copyright (c) 2018-2028, kongcloud@foxmail.com.
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kongcloud.core.constant;

/**
 * 访问统计控制
 *
 * @author Chill
 */
public class RegisterEnvConstant {
	//metric
	public static int METRIC_DEFAULT_MOD_NUM  = 50;
	public static int METRIC_DEFAULT_VALUE  = 10000;

	public static int METRIC_STEP_LIMIT  = 50000;
	public static String KONGCLOUD_REGISTER_ENV_MOD_NUM_KEY = "app.register.env.mod.num";
	public static String KONGCLOUD_REGISTER_ENV_MARK = "app.register.env.mark";
	public static String KONGCLOUD_REGISTER_COUNTER = "app.register.counter.a";
	public static String KONGCLOUD_REGISTER_BOOT_DETAIL = "app.register.boot.c";
	public static String KONGCLOUD_REGISTER_INTER_DETAIL = "app.register.inter.d";

	public static void init(String application) {
		if (!KONGCLOUD_REGISTER_ENV_MARK.endsWith(application)) {
			KONGCLOUD_REGISTER_ENV_MARK = KONGCLOUD_REGISTER_ENV_MARK + "." + application;
		}
		if (!KONGCLOUD_REGISTER_COUNTER.endsWith(application)) {
			KONGCLOUD_REGISTER_COUNTER = KONGCLOUD_REGISTER_COUNTER + "." + application;
		}

		if (!KONGCLOUD_REGISTER_BOOT_DETAIL.endsWith(application)) {
			KONGCLOUD_REGISTER_BOOT_DETAIL = KONGCLOUD_REGISTER_BOOT_DETAIL + "." + application;
		}
		if (!KONGCLOUD_REGISTER_INTER_DETAIL.endsWith(application)) {
			KONGCLOUD_REGISTER_INTER_DETAIL = KONGCLOUD_REGISTER_INTER_DETAIL + "." + application;
		}

	}


}
